﻿Public Class cls_whisframework

    Public Shared Function Chk_Permission(ByVal int_permission As Integer) As Boolean
        Chk_Permission = False
        Try
            Dim Strsql As String = ""
            Dim Mysql1 As New ClsSQLhelper
            Dim DS As New DataSet

            Strsql = "Select * from grouppermission where groupid = " & My.Settings.CurrentuserGroup & " and  permissionid = " & int_permission & " and siteid = " & My.Settings.CurrentSite
            DS = Mysql1.GetMYSQLDataset(Strsql, "DS_grouppermission", "grouppermission")
            If DS.Tables(0).Rows.Count = 0 Then Exit Function
            Chk_Permission = True

        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical, "Function : Chk_Permission")
        End Try

    End Function

End Class
